package com.lzw.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.lzw.mapper.LogMapper;
import com.lzw.pojo.OperateLog;
import com.lzw.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServiceImpl implements LogService {

    @Autowired
    private LogMapper logMapper;

    @Override
    public List<OperateLog> list(Integer pageNumber, Integer pageSize, String operateUser) {
        PageHelper.startPage(pageNumber,pageSize);
        List<OperateLog> list = logMapper.list(operateUser);
        Page<OperateLog> logs = (Page<OperateLog>) list;
        return logs;
    }
}
